{% extends "base/base.html" %}
{% import "macro/display.html" as display -%}
{% block title %}Inbox{% endblock %}

{% block main %}
<h2><img class="icon_header" src="{{ MEDIA_URL }}email.png" alt="" />Inbox - {{ pms|e }} Private Messages</h2>
{% if pms != "sent" %}<a href="{{ url("dv-inbox") }}?type=sent">View Sent Messages</a>{% endif %}
<table class="songlist">
<tr><th>Subject</th><th>From</th><th>To</th><th>Sent Date</th></tr>
{% for mail in mails %}
<tr class="{{ loop.cycle('row1', 'row2') }}">
 <td><a href="{{ mail.get_absolute_url() }}">{{ mail.subject|e }}</a>{% if mail.unread %} <img src="{{ MEDIA_URL }}new.png" alt="[New Message]" />{% endif %}</td>
 <td>{{ display.user(mail.sender) }}</td>
 <td>{{ display.user(mail.to) }}</td>
 <td>{{ mail.sent }}</td>
 {% if pms != "sent" %}<td><a href=".?delete={{ mail.id }}">Delete</a></td>{% endif %}
</tr>
{% endfor %}
</table>
{% endblock %}

